This appendix is a reference to the HTML tags you can use in your documents. Unless otherwise noted, all of the tags listed here are supported by both Microsoft Explorer 3.0 and Netscape Navigator 3.0. Note that some other browsers do not support all the tags listed, and some of the tags listed as (MS) may also be supported in the final shipping version of Netscape 3.0.
The proposed HTML style sheet specification is also not covered here. Refer to the Netscape (http://home.netscape.com/) or Microsoft (http://www.microsoft.com/) Web sites for details on this and other late-breaking changes to the new HTML 3.2 standard.
These tags are used to create a basic HTML page with text, headings, and lists. An (MS) beside the attribute indicates Microsoft.
<!-- ... --> | Creates a comment. Can also be used to hide JavaScript from browsers that do not support it. |
<COMMENT>...</COMMENT> | The new official way of specifying comments. |
<HTML>...</HTML> | Encloses the entire HTML document. |
<HEAD>...</HEAD> | Encloses the head of the HTML document. |
<BODY>...</BODY> | Encloses the body (text and tags) of the HTML document. |
Attributes:
BACKGROUND="..." The name or URL of the image to tile on the page background. |
<BASE> | Indicates the full URL of the current document. This optional tag is used within <HEAD>. |
Attributes:
HREF="..." The full URL of this document. |
<ISINDEX> | Indicates that this document is a gateway script that allows searches. |
Attributes:
PROMPT="..." The prompt for the search field. |
<LINK> | Indicates a link between this document and some other document. Generally used only by HTML-generating tools. <LINK> represents a link from this entire document to another, as opposed to <A>, which can create multiple links in the document. Not commonly used. |
Attributes:
HREF="..." The URL of the document to call when the link is activated. |
<META> | Indicates meta-information about this document (information about the document itself); for example, keywords for search engines, special HTTP headers to be used for retrieving this document, expiration date, and so on. Meta-information is usually in a key/value pair form. Used in the document <HEAD>. |
Attributes:
HTTP-EQUIV="..." Creates a new HTTP header field with the same name as the attribute's value; for example, HTTP-EQUIV="Expires". The value of that header is specified by the CONTENT attribute. |
<NEXTID> | Indicates the "next" document to this one (as might be defined by a tool to manage HTML documents in series). <NEXTID> is considered obsolete. |
<H1>...</H1> | A first-level heading. |
<H2>...</H2> | A second-level heading. |
<H3>...</H3> | A third-level heading. |
<H4>...</H4> | A fourth-level heading. |
<H5>...</H5> | A fifth-level heading. |
<H6>...</H6> | A sixth-level heading. |
<TITLE>...</TITLE> | Indicates the title of the document. Used within <HEAD>. |
All heading tags accept the following attribute: | |
Attributes:
ALIGN="..." Possible values are CENTER, LEFT, and RIGHT. |
<P>...</P> | A plain paragraph. The closing tag (</P>) is optional. |
Attributes:
ALIGN="..." Align text to CENTER, LEFT, or RIGHT. |
<DIV>...</DIV> | A region of text to be formatted. |
Attributes:
ALIGN="..." Align text to CENTER, LEFT, or RIGHT. |
<A>...</A> | With the HREF attribute, this creates a link to another document or anchor; with the NAME attribute, it creates an anchor that can be linked to. |
Attributes:
HREF="..." The URL of the document to be called when the link is activated. |
<OL>...</OL> | An ordered (numbered) list. |
Attributes:
TYPE="..." The type of numerals to label the list. Possible values are A, a, I, i, 1. |
<UL>...</UL> | An unordered (bulleted) list. |
Attributes:
TYPE="..." The bullet dingbat to use to mark list items. Possible values are DISC, CIRCLE (or ROUND), and SQUARE. |
<MENU>...</MENU> | A menu list of items. |
<DIR>...</DIR> | A directory listing; items are generally smaller than 20 characters. |
<LI> | A list item for use with <OL>, <UL>, <MENU>, or <DIR>. |
Attributes:
TYPE="..." The type of bullet or number to label this item with. Possible values are DISC, CIRCLE (or ROUND), SQUARE, A, a, I, i, 1. |
<DL>...</DL> | A definition or glossary list. |
Attributes:
COMPACT The COMPACT attribute specifies a formatting that takes less whitespace to present. |
<DT> | A definition term, as part of a definition list. |
<DD> | The corresponding definition to a definition term, as part of a definition list. |
<EM>...</EM> | Emphasis (usually italic). |
<STRONG>...</STRONG> | Stronger emphasis (usually bold). |
<CODE>...</CODE> | Code sample (usually Courier). |
<KBD>...</KBD> | Text to be typed (usually Courier). |
<VAR>...</VAR> | A variable or placeholder for some other value. |
<SAMP>...</SAMP> | Sample text (seldom used). |
<DFN>...<DFN> | A definition of a term. |
<CITE>...</CITE> | A citation. |
<B>...</B> | Boldface text. |
<I>...</I> | Italic text. |
<TT>...</TT> | Typewriter (monospaced) font. |
<PRE>...</PRE> | Preformatted text (exact line endings and spacing will be preserved-usually rendered in a monospaced font). |
<BIG>...</BIG> | Text is slightly larger than normal. |
<SMALL>...</SMALL> | Text is slightly smaller than normal. |
<SUB>...</SUB> | Subscript. |
<SUP>...</SUP> | Superscript. |
<STRIKE>...</STRIKE> | Puts a strikethrough line in the text. |
<HR> | A horizontal rule line. |
Attributes:
SIZE="..." The thickness of the rule, in pixels. |
<BR> | A line break. |
Attributes:
CLEAR="..." Causes the text to stop flowing around any images. Possible values are RIGHT, LEFT, and ALL. |
<NOBR>...</NOBR> | Causes the enclosed text not to wrap at the edge of the page. |
<WBR> | Wraps the text at this point only if necessary. |
<BLOCKQUOTE>... </BLOCKQUOTE> | Used for long quotes or citations. |
<ADDRESS>...</ADDRESS> | Used for signatures or general information about a document's author. |
<CENTER>...</CENTER> | Centers text or images. |
<BLINK>...</BLINK> | Causes the enclosed text to blink irritatingly. |
<FONT>...</FONT> | Changes the size of the font for the enclosed text. |
Attributes:
SIZE="..." The size of the font, from 1 to 7. Default is 3. Can also be specified as a value relative to the current size; for example, +2. |
<BASEFONT> | Sets the default size of the font for the current page. |
Attributes:
SIZE="..." The default size of the font, from 1 to 7. Default is 3. |
<IMG> | Inserts an inline image into the document. |
Attributes:
ISMAP This image is a clickable image map. |
<BGSOUND> (MS) | Plays a sound file as soon as the page is displayed. |
Attributes:
SRC="..." The URL of the WAV, AU, or MIDI sound file to embed. |
Note |
The full syntax for the <OBJECT> tag is not yet completely finalized. Check http://www.w3.org/pub/WWW/TR/WD-object.html and http://www.microsoft.com/intdev/author/ for the latest attributes supported by the HTML 3.2 standard and implemented in Microsoft Internet Explorer. |
<OBJECT> (MS) | Inserts an image, video, Java applet, or ActiveX OLE control into a document. |
<EMBED> (Netscape only!) | Embeds a file to be read or displayed by a plug-in application. |
Attributes:
SRC="..." The URL of the file to embed. |
Note |
In addition to the following standard attributes, you can specify applet-specific attributes to be interpreted by the plug-in that displays the embedded object. |
<NOEMBED>...</NOEMBED> (N) | Alternate text or images to be shown to users who do not have a plug-in installed. |
<OBJECT> (MS) | Inserts an embedded program, control, or other object. (This tag was under revision when this book was printed.) |
<MAP>...</MAP> | A client-side image map, referenced by <IMG USEMAP="...">. Includes one or more <AREA> tags. |
<AREA> | Defines a clickable link within a client-side image map. |
Attributes:
SHAPE="..." The shape of the clickable area. Currently, only RECT is supported. |
<FORM>...</FORM> | Indicates an input form. |
Attributes:
ACTION="..." The URL of the script to process this form input. |
<INPUT> | An input element for a form. |
Attributes:
TYPE="..." The type for this input widget. Possible values are chECKBOX, HIDDEN, RADIO, RESET, SUBMIT, TEXT, SEND FILE, or IMAGE. |
<TEXTAREA>...</TEXTAREA> | Indicates a multiline text entry form element. Default text can be included. |
Attributes:
NAME="..." The name to be passed to the gateway script as part of the name/value pair. |
<SELECT>...</SELECT> | Creates a menu or scrolling list of possible items. |
Attributes:
NAME="..." The name that is passed to the gateway script as part of the name/value pair. |
<OPTION> | Indicates a possible item within a <SELECT> element. |
Attributes:
SELECTED With this attribute included, the <OPTION> will be selected by default in the list. |
<TABLE>...</TABLE> | Creates a table that can contain a caption (<CAPTION>) and any number of rows (<TR>). |
Attributes:
BORDER="..." Indicates whether the table should be drawn with or without a border. In Netscape, BORDER can also have a value indicating the width of the border. |
<CAPTION>...</CAPTION> | The caption for the table. |
Attributes:
ALIGN="..." The position of the caption. Possible values are TOP and BOTTOM. |
<TR>...</TR> | Defines a table row, containing headings and data (<TR> and <TH> tags). |
Attributes:
ALIGN="..." The horizontal alignment of the contents of the cells within this row. Possible values are LEFT, RIGHT, and CENTER. |
<TH>...</TH> | Defines a table heading cell. |
Attributes:
ALIGN="..." The horizontal alignment of the contents of the cell. Possible values are LEFT, RIGHT, and CENTER. |
<TD>...</TD> | Defines a table data cell. |
Attributes:
ALIGN="..." The horizontal alignment of the contents of the cell. Possible values are LEFT, RIGHT, and CENTER. |
<THEAD> (MS) | Begins the header section of a table. The closing </THEAD> tag is optional. |
<TBODY> (MS) | Begins the body section of a table. The closing </TBODY> tag is optional. |
<TFOOT> (MS) | Begins the footer section of a table. The closing </TFOOT> tag is optional. |
<COL>...</COL> (MS) | Sets width and alignment properties for one or more columns. |
Attributes:
WIDTH="..." Width of column(s) in pixels or relative width followed by a * ("2*" columns will be twice as wide as "1*" columns, for example). |
<COLGROUP>...</COLGROUP> | Sets properties of a group of columns all at once (should enclose one or more <COL> tags). |
Attributes:
ALIGN="..." Text alignment within the columns. Valid values are "center", "justify", "left", and "right". |
<FRAMESET>...</FRAMESET> | Divides the main window into a set of frames that can each display a separate document. |
Attributes:
ROWS="..." Splits the window or frameset vertically into a number of rows specified by a number (such as 7), a percentage of the total window width (such as 25%), or as an asterisk (*) indicating that a frame should take up all the remaining space or divide the space evenly between frames (if multiple * frames are specified). |
<FRAME> | Defines a single frame within a <FRAMESET>. |
Attributes:
SRC="..." The URL of the document to be displayed in this frame. |
</NOFRAME>...</NOFRAMES> | Provides an alternative document body in <FRAMESET> documents for browsers that do not support frames (usually encloses <BODY>...</BODY>). |
<APPLET> | Inserts a self-running Java applet. |
Attributes: CLASS="..." The name of the applet. |
Note |
In addition to the following standard attributes, you can specify applet-specific attributes to be interpreted by the Java applet itself. |
<SCRIPT> | An interpreted script program. |
Attributes:
LANGUAGE="..." Currently only JAVASCRIPT is supported by Netscape. Both JAVASCRIPT and VBSCRIPT are supported by Microsoft. |
<MARQUEE>...</MARQUEE> (MS) | Displays text in a scrolling marquee. |
Attributes:
WIDTH="..." The width of the embedded object in pixels or percentage of window width. |
Table A.1 contains the possible numeric and character entities for the ISO-Latin-1 (ISO8859-1) character set. Where possible, the character is shown.
Note |
Not all browsers can display all characters, and some browsers may even display characters different from those that appear in the table. Newer browsers seem to have a better track record for handling character entities, but be sure to test your HTML files extensively with multiple browsers if you intend to use these entities. |
Description | |||
Unused | |||
Horizontal tab | |||
Line feed | |||
Unused | |||
Space | |||
Exclamation mark | |||
Quotation mark | |||
Number sign | |||
Dollar sign | |||
Percent sign | |||
Ampersand | |||
Apostrophe | |||
Left parenthesis | |||
Right parenthesis | |||
Asterisk | |||
Plus sign | |||
Comma | |||
Hyphen | |||
Period (fullstop) | |||
Solidus (slash) | |||
Digits 0-9 | |||
Colon | |||
Semicolon | |||
Less than | |||
Equals sign | |||
Greater than | |||
Question mark | |||
Commercial "at" | |||
Letters A-Z | |||
Left square bracket | |||
Reverse solidus (backslash) | |||
Right square bracket | |||
Caret | |||
Horizontal bar | |||
Grave accent | |||
Letters a-z | |||
Left curly brace | |||
Vertical bar | |||
Right curly brace | |||
Tilde | |||
Unused | |||
Inverted exclamation | |||
Cent sign | |||
Pound sterling | |||
General currency sign | |||
Yen sign | |||
Broken vertical bar | |||
Section sign | |||
Umlaut (dieresis) | |||
Copyright | |||
Feminine ordinal | |||
Left angle quote, guillemot left | |||
Not sign | |||
Soft hyphen | |||
Registered trademark | |||
Macron accent | |||
Degree sign | |||
Plus or minus | |||
Superscript two | |||
Superscript three | |||
Acute accent | |||
Micro sign | |||
Paragraph sign | |||
Middle dot | |||
Cedilla | |||
Superscript one | |||
Masculine ordinal | |||
Right angle quote, guillemot right | |||
Fraction one-fourth | |||
Fraction one-half | |||
Fraction three-fourths | |||
Inverted question mark | |||
Capital A, grave accent | |||
Capital A, acute accent | |||
Capital A, circumflex accent | |||
Capital A, tilde | |||
Capital A, dieresis or umlaut mark | |||
Capital A, ring | |||
Capital AE diphthong (ligature) | |||
Capital C, cedilla | |||
Capital E, grave accent | |||
Capital E, acute accent | |||
Capital E, circumflex accent | |||
Capital E, dieresis or umlaut mark | |||
Capital I, grave accent | |||
Capital I, acute accent | |||
Capital I, circumflex accent | |||
Capital I, dieresis or umlaut mark | |||
Capital Eth, Icelandic | |||
Capital N, tilde | |||
Capital O, grave accent | |||
Capital O, acute accent | |||
Capital O, circumflex accent | |||
Capital O, tilde | |||
Capital O, dieresis or umlaut mark | |||
Multiply sign | |||
Capital O, slash | |||
Capital U, grave accent | |||
Capital U, acute accent | |||
Capital U, circumflex accent | |||
Capital U, dieresis or umlaut mark | |||
Capital Y, acute accent | |||
Capital THORN, Icelandic | |||
Small sharp s, German (szligature) | |||
Small a, grave accent | |||
Small a, acute accent | |||
Small a, circumflex accent | |||
Small a, tilde | |||
Small a, dieresis or umlaut mark | |||
Small a, ring | |||
Small ae diphthong (ligature) | |||
Small c, cedilla | |||
Small e, grave accent | |||
Small e, acute accent | |||
Small e, circumflex accent | |||
Small e, dieresis or umlaut mark | |||
Small i, grave accent | |||
Small i, acute accent | |||
Small i, circumflex accent | |||
Small i, dieresis or umlaut mark | |||
Small eth, Icelandic | |||
Small n, tilde | |||
Small o, grave accent | |||
Small o, acute accent | |||
Small o, circumflex accent | |||
Small o, tilde | |||
Small o, dieresis or umlaut mark | |||
Division sign | |||
Small o, slash | |||
Small u, grave accent | |||
Small u, acute accent | |||
Small u, circumflex accent | |||
Small u, dieresis or umlaut mark | |||
Small y, acute accent | |||
Small thorn, Icelandic | |||
Small y, dieresis or umlaut mark |